package com.acsior.hibernate.vo;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.acsior.dac.impl.hibernate.vo.GeneratorKey;
import com.acsior.dac.impl.hibernate.vo.HibernatePersistantIntegerIdVO;

/**
 * PostalServiceSupplement entity. @author MyEclipse Persistence Tools
 * <b><i>powered by Belev</i></b>
 */
@Entity
@Table(name = "postal_service_supplements")
@GeneratorKey(tableName = "postal_service_supplements")
public class PostalServiceSupplementVO extends HibernatePersistantIntegerIdVO {

	private static final long serialVersionUID = 3992197983915095348L;

	@Column(name = "commission")
	private int commission;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "contract_id", nullable = false)
	private ContragentContractVO contragentContract;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "postal_service_id", nullable = false)
	private PostalServiceVO postalService;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "web_system_id")
	private WebSystemVO webSystem;

	/** default constructor */
	public PostalServiceSupplementVO() {
		super();
	}

	/**
	 * @return the commission
	 */
	public int getCommission() {
		return this.commission;
	}

	/** @return the contragentContract */
	public ContragentContractVO getContragentContract() {
		return this.contragentContract;
	}

	/** @return the postalService */
	public PostalServiceVO getPostalService() {
		return this.postalService;
	}

	/** @return the webSystem */
	public WebSystemVO getWebSystem() {
		return this.webSystem;
	}

	/**
	 * @param commission
	 *            the commission to set
	 */
	public void setCommission(int commission) {
		this.commission = commission;
	}

	/**
	 * @param contragentContract
	 *            the contragentContract to set
	 */
	public void setContragentContract(ContragentContractVO contragentContract) {
		this.contragentContract = contragentContract;
	}

	/**
	 * @param postalService
	 *            the postalService to set
	 */
	public void setPostalService(PostalServiceVO postalService) {
		this.postalService = postalService;
	}

	/**
	 * @param webSystem
	 *            the webSystem to set
	 */
	public void setWebSystem(WebSystemVO webSystem) {
		this.webSystem = webSystem;
	}

}